<div class="ibox-content">
    <form id="signupForm" class="form-horizontal m-t" method="post" action="{:\\think\\Url::build('User/submitPassword')}">
        <div class="form-group">
            <label class=" control-label">原密码<span class="check-tips">(请输入原密码)</span></label>
            <input  class="form-control input-large" type="password" autocomplete="off" name="old">
        </div>
        <div class="form-group">
            <label class=" control-label">新密码<span class="check-tips">(请输入新密码)</span></label>
            <input  class="form-control input-large" id="password" type="password" name="password">
        </div>
        <div class="form-group">
            <label class=" control-label">确认密码<span class="check-tips">(请输入确认密码)</span></label>
            <input  class="form-control input-large" type="password" name="repassword">
        </div>
        <div class="form-group">
            <button class="btn btn-primary" type="submit">提交</button>
        </div>
    </form> 
</div>
<script type="text/javascript" src="__JS__/plugins/validate/jquery.validate.min.js"></script>
<script type="text/javascript">
    $("#signupForm").validate({
            rules: {
                old: {
                    required: true
                },
                password: {
                    required: true,
                    minlength: 6
                },
                repassword: {
                    required: true,
                    minlength: 6,
                    equalTo: "#password"
                }
            },
            messages: {
                old: {
                    required: "原密码不能为空"
                },
                password: {
                    required: "请输入您的密码",
                    minlength: "密码必须6个字符以上"
                },
                repassword: {
                    required: "请次输入确认密码",
                    minlength: "密码必须6个字符以上",
                    equalTo: "两次输入的密码不一致"
                }
            },
            submitHandler: function () {
                validateAjax("#signupForm","button[type='submit']");
                return false;
            }
        });
</script>
